#pragma once
#include <map>

#include <d3d9.h>

#include "Utils.h"
#include "Texture.h"
#include "CustomDefine.h"

using namespace std;

class TextureManager {
private:
	LPDIRECT3DDEVICE9 _d3ddv;
	static TextureManager *_singleton;

	// list of textures
 	map<int, Texture*> _mapTextures;
	
	// Initialize texture manager
	static void initialize(LPDIRECT3DDEVICE9);

	// constructor
	TextureManager(void);

public:

	// add texture to _textures from filepath
	void addTextureFromPath(LPDIRECT3DDEVICE9, LPWSTR, int, int, int, int, int);

	// get texture from id
	Texture* getTexture(int);

	// destroy manager
	void destroy(void);

	// Get Singleton Instance
	static TextureManager *getInstance(LPDIRECT3DDEVICE9);
};


